This is the data archive for "Technology and the Effectiveness of Regulatory Programs 
Over Time: Vehicle Emissions and Smog Checks with a Changing Fleet," by Sanders and Sandler.

The archive has three subfolders:

build: Code and some intermediate datasets used to build the final analysis dataset used
for most of the analysis in the paper. 
analysis: Final analysis data and code used to produce the tables and figures in the paper
appendix: Code and some additional datasets used to produce tables and figures in the online appendix


The top level directory contains smog_master.do, a script which calls all of the other
build and analysis scripts in order.  The comments in the script describe the function
of each script and the output of each script.

Only datasets used for the final analysis were provided in the archive.  Most of the analysis
in the paper uses a county-day panel containing variables calculated from Smog Check Program
data.  The full Smog Check Program data is extremely large, and has an MOU limiting its distribution
in raw form.  The Smog Check Program data is public record, and can generally be obtained by 
submitting a Public Records Act request to the California Bureau of Automitive Repair at 
BAR.PRA@dca.ca.gov. 

Scripts for converting raw Smog Check Data into the form used for the paper are included in the
archive.  Scripts that rely on data not included in the archive are commented out in smog_master.do.

The main intermediate datasets not included are:

smog.dta: This file is constructed by reading and appending the test[date] files for 1996-2012
from the Smog Check program.  The unit of observation in these data is a Smog Check emissions
inspection.  No other cleaning is done to the data

smog_precollapse: This file is produced by cleaning smog.dta to drop problematic data, cleaning
odometer readings and other fixes.  It is used to collapse down to a county-day panel.

For any questions about the content of the archive, or how to obtain the raw Smog Check Data,
contact Ryan Sandler at Ryan.Sandler@cfpb.gov